import request from '@/utils/request'

// 查询药品列表
export function listUndesirable(query) {
  return request({
    url: '/project/undesirable/list',
    method: 'get',
    params: query
  })
}

// 查询药品详细
export function getUndesirable(id) {
  return request({
    url: '/project/undesirable/' + id,
    method: 'get'
  })
}

// 新增药品
export function addUndesirable(data) {
  return request({
    url: '/project/undesirable',
    method: 'post',
    data: data
  })
}

// 修改药品
export function updateUndesirable(data) {
  return request({
    url: '/project/undesirable',
    method: 'put',
    data: data
  })
}

// 删除药品
export function delUndesirable(id) {
  return request({
    url: '/project/undesirable/' + id,
    method: 'delete'
  })
}
